package com.jn.hilt.manager;

import com.jn.hilt.entity.User;
import com.jn.hilt.qualifier.AppQualifier;

import javax.inject.Singleton;

import jakarta.inject.Inject;

@Singleton
public class UserManagerIntParams {
    private final int maxUserCount;
    @Inject
    public UserManagerIntParams(@AppQualifier.MaxUserCount int maxUserCount) {
        this.maxUserCount = maxUserCount;
    }

    // 业务方法：创建用户
    public User createUser(String id, String name, int phone, String address) {
        return new User(id, name, phone, address);
    }

    // 业务方法：格式化用户信息
    public String formatUserInfo(User user) {
        return user.toString();
    }
}